package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.HomeModuleBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 首页——子功能
 */
public class HomeModuleAdapter extends BaseQuickAdapter<HomeModuleBean,BaseViewHolder> {

    public HomeModuleAdapter(int layoutResId, List<HomeModuleBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, HomeModuleBean item) {
        baseViewHolder.setText(R.id.tv_title, item.getTitle());
        ImageView ivPic = baseViewHolder.getView(R.id.iv_pic);
        ImageLoadingUtil.loadImgType(ivPic,item.getPic(),0);
    }
}
